table of contents
PARTX(8) | System Administration | PARTX(8) |
NAME¶
partx - tell the kernel about the presence and numbering of on-disk partitions
SYNOPSIS¶
partx [-a|-d|-P|-r|-s|-u] [-t type] [-n M:_N_] [-] disk
partx [-a|-d|-P|-r|-s|-u] [-t type] partition [disk]
DESCRIPTION¶
Given a device or disk-image, partx tries to parse the partition table and list its contents. It can also tell the kernel to add or remove partitions from its bookkeeping.
The disk argument is optional when a partition argument is provided. To force scanning a partition as if it were a whole disk (for example to list nested subpartitions), use the argument "-" (hyphen-minus). For example:
partx --show - /dev/sda3
This will see sda3 as a whole-disk rather than as a partition.
partx is not an fdisk program - adding and removing partitions does not change the disk, it just tells the kernel about the presence and numbering of on-disk partitions.
OPTIONS¶
-a, --add
-b, --bytes
-d, --delete
-g, --noheadings
-l, --list
-n, --nr M:N
M
M:
:N
M:N
-o, --output list
--output-all
-P, --pairs
-r, --raw
-s, --show
-t, --type type
--list-types
-u, --update
-S, --sector-size size
-v, --verbose
-V, --version
-h, --help
ENVIRONMENT¶
LIBBLKID_DEBUG=all
EXAMPLE¶
partx --show /dev/sdb3, partx --show --nr 3 /dev/sdb, partx --show /dev/sdb3 /dev/sdb
partx --show - /dev/sdb3
partx -o START -g --nr 5 /dev/sdb
partx -o SECTORS,SIZE /dev/sda5 /dev/sda
partx --add --nr 3:5 /dev/sdd
partx -d --nr :-1 /dev/sdd
AUTHORS¶
Davidlohr Bueso <dave@gnu.org>, Karel Zak <kzak@redhat.com>
The original version was written by Andries E. Brouwer <aeb@cwi.nl>
SEE ALSO¶
REPORTING BUGS¶
For bug reports, use the issue tracker at <https://github.com/karelzak/util-linux/issues>.
AVAILABILITY¶
The partx command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
2022-02-14 | util-linux 2.37.4 |